<!--src/main/resources/templates/articletype/articletypes.html-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>文章类型</title>
  <link rel="stylesheet" type="text/css" th:href="@{/css/styles.css}">
</head>
<body>
<h2>文章类型</h2>

<a th:href="@{/articletype/add}" class="btn-blue">添加新的文章类型</a>
<a th:href="@{/articletype/search}" class="btn-blue">搜索文章类型</a>
<a th:href="@{/index}" class="btn-blue">回到首页</a>

<table>
  <thead>
  <tr>
    <th>文章类型编号</th>
    <th>文章类型</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <tr th:each="articletype : ${articletypes}">
    <td th:text="${articletype.id}"></td>
    <td th:text="${articletype.type}"></td>
    <td>
      <a th:href="@{'/articletype/edit/' + ${articletype.id}}" class="btn-gray">编辑</a>
      <a th:href="@{'/articletype/delete/' + ${articletype.id}}" class="btn-red">删除</a>
    </td>
  </tr>
  </tbody>
</table>

</body>
</html>
